<?php

	require_once( '../system/smarty.inc' );

	require_once( '../system/Class_ERROR.php' );
	require_once( '../system/login.inc.php' );
	require_once( '../system/aoki_m.php' );
	require_once( '../system/mdao/Class_M_OTHER.php' );
	require_once( '../system/Class_PWD.php' );
	
	Class_PWD::valid_auth(AOKI_AUTH_COST_DM, $login['staff_auth']);
	$forms = array();
	$forms["year4"] = isset($_GET["year4"]) ? $_GET["year4"]:date('Y');
	$forms["sort"] = isset($_GET["sort"]) ? $_GET["sort"]:1;
	
	if (empty($forms["year4"])) {
		$forms["year4"] = date('Y');
	}
	$smarty->assign('year4',  Class_PWD::get_years());
	
	
	$smarty->assign('sorts', $aoki_flier_price_sort);
	$smarty->assign('forms', $forms);
	if( isset( $err_mes ) ) $smarty->assign('err', $err_mes);
	$smarty->assign('err', $err_mes);
	$smarty->assign('menu',   $smarty->fetch('menu.html') );
	$smarty->assign('logout', $smarty->fetch('logout.html') );
	$smarty->assign('footer', $smarty->fetch('footer.html') );
	
	if (isset($_GET["pro"]) && $_GET["pro"] == "sucess") {
		$smarty->display('mcost_flier_price_import_end.html');
	} else {
		$smarty->assign('import', $smarty->fetch('import.html') );
		$smarty->display('mcost_flier_price_import.html');		
	}

?>